# -*- coding: utf-8 -*-

import glob, os, importlib, logging
"""
The flask application package.
"""

from flask import Flask
app = Flask(__name__)

for module_file in glob.glob("RestServer/*.py"):
    try:
        module_name, ext = os.path.splitext(os.path.basename(module_file))
        if module_name != "__init__":
            mm = "RestServer." + module_name
            importlib.import_module(mm)
            logging.debug(" * + 加载 <<" + mm + ">> 成功!")
    except ImportError:
        logging.error(" * * 加载 <<" + mm + ">> 失败: " + ImportError.msg)
        pass
print(" " + "-" * 84)
